#! /usr/bin/perl -w
#------------------------------------------------
# Author:    kvkrishna
# Created:   Thu Aug 25 11:58:32 IST 2011
# File Name: StatusBar
# USAGE: 
# 
# 
# 
#------------------------------------------------
chomp ( $LINE   = `tput lines`);
$StrtCol        = 20;
$Len            = 100;
$Scale          = $Len / 100;
$Percentage     = ($ARGV[0] - 100 * int (($ARGV[0] -1 )/ 100));
$CutOff         = $Percentage * $Scale;
system "tput civis ; tput cup $LINE $StrtCol";
for ($i=0; $i<$CutOff; $i++) { print "|"; }
for (    ; $i<$Len   ; $i++) { print "-"; }
system "tput cup 50  ; tput cnorm";
